libxl_disk: Cut libxl_cdrom_insert into steps ..
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 22 Mar 2019 15:04:57 +0000 (15:04 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 19 Sep 2019 11:24:56 +0000 (12:24 +0100)
commit875538465ac7470a491116689e6ae731f585a6c9
tree706f29e1f5ed324e66b48b0a7b6aa7f79dfe42c4
parentf13f900a46a97a878d04ab02035bf2fee2ed713a
libxl_disk: Cut libxl_cdrom_insert into steps ..

.. and use a new "slow" lock to avoid holding the userdata lock across
several functions.

This patch cuts libxl_cdrom_insert into different step/function but
there are still called synchronously. (Taking the ev_lock is the only
step that might be asynchronous.) A later patch will call them
asynchronously when QMP is involved.

Thee userdata lock (json_lock) use to protect against concurrent change
of cdrom is replaced by an ev_lock which can be held across different
CTX_LOCK sections. The json_lock is still used when reading/modifying
the domain userdata (mandatory) and update xenstore (mostly because
it's updated as the same time as the userdata).

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_disk.c